<style>
  td,th{
    text-align: center;

  }
</style>
<h1>上传Excel模板</h1>
<%= form_tag({action: :upload}, multipart: true) do %>
    <%= file_field_tag 'excel' %>
    <%= submit_tag '提交' %>
<% end %>
<div style="margin-top: 100px">
  <table border="1" cellspacing="0" cellpadding="0">
    <th style="width: 100px">ID</th>
    <td style="width: 100px">Excel文件名</td>
    <td style="width: 100px">表格行数</td>
    <td style="width: 100px">委托书打印次数</td>
    <td style="width: 100px">放行清单打印次数</td>
    <td style="width: 100px">出库清单打印次数</td>
    <td style="width: 100px">导入时间</td>
    <% @indices.each do |index| %>
      <tr>
        <td><%= index.id %></td>
        <td><%= index.excel %></td>
        <td><%= index.count %></td>
        <td><%= index.print_count %> &nbsp;<%= link_to '打印',{:action => 'show',:controller => 'upload',:method => 'get', :id => index.id} %> </td>
        <td><%= index.release_cont %>&nbsp;<%= link_to '打印',{:action => 'show_release',:controller => 'upload',:method => 'get', :id => index.id} %></td>
        <td><%= index.out_count %></td>
        <td><%= index.created_at %></td>
      </tr>
    <% end %>
  </table>
</div>